import request from "../../utils/request.js";

// 列表，参数菜品实体类
export function queryAllSatisfiedDishes(query){
    return request({
        url: '/restaurant-manager/dishes-maintain/query',
        method: 'get',
        params: query,
        isToken: true
    })
}

// 单个，参数菜品id
export function queryCertainDetailDish(id){
    return request({
        url: '/restaurant-manager/dishes-maintain/'+id,
        method: 'get',
        isToken: true
    })
}

// 改，参数{"dish": 菜品实体类, "dishPic": MultiPartFile}
export function updateCertainDish(data){
    return request({
        url: '/restaurant-manager/dishes-maintain/update',
        method: 'put',
        data: data,
        isToken: true
    })
}

// 增，参数{"dish": 菜品实体类, "dishPic": MultiPartFile}
export function addCertainDish(data){
    return request({
        url: '/restaurant-manager/dishes-maintain/add',
        method: 'post',
        data: data,
        isToken: true
    })
}

// 删，参数菜品id列表
export function deleteCertainDishesByIds(ids){
    return request({
        url: '/restaurant-manager/dishes-maintain/'+ids,
        method: 'delete',
        isToken: true
    })
}